<?php

namespace App\Http\Requests\posts;

use Illuminate\Foundation\Http\FormRequest;

class PostsRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'posts_cate_id' => 'required|numeric',
//            'title' => 'max:255',
            'imgs' => 'max:650',
            'goods_id' => 'numeric',
            'type' => 'required|in:1,2',
            'is_show' => 'required|in:0,1'
        ];
    }
}
